#ifndef _MAIN_FRAME_H_
#define _MAIN_FRAME_H_

class CMainFrame : 
    public CFrameWindowImpl<CMainFrame>,
    public CWinDataExchange<CMainFrame>,
    public CMessageFilter,
    public CIdleHandler
{
public:
    DECLARE_FRAME_WND_CLASS(_T("Dango window"), NULL);

    virtual BOOL PreTranslateMessage(MSG* pMsg);
    virtual BOOL OnIdle();

    BEGIN_DDX_MAP(CMainFrame)
    END_DDX_MAP()

    BEGIN_MSG_MAP_EX(CMainFrame)
        MSG_WM_CREATE(OnCreate)
        MSG_WM_DESTROY(OnDestroy)
        MSG_WM_LBUTTONDOWN(OnLButtonDown)
        MSG_WM_ERASEBKGND(OnEraseBkgnd)
        CHAIN_MSG_MAP(CFrameWindowImpl<CMainFrame>)
    END_MSG_MAP()

    CMainFrame();
    ~CMainFrame();

    int OnCreate(LPCREATESTRUCT lpCreateStruct);
    void OnDestroy();
    void OnLButtonDown(UINT nFlags, _WTYPES_NS::CPoint point);
    BOOL OnEraseBkgnd(CDCHandle dc);
};

#endif // _MAIN_FRAME_H_